<?php 
$inc_lib = realpath(dirname(__FILE__) . '/../../teia.lib/inc/inc_core.inc');
require_once $inc_lib;
use teia\webdev\php\core as teia;

if (!isset($show_search)) $show_search = true;
$cart = teia\SessionWrapper::get_cart(null);
$cart_size = $cart->get_size();

?>

<div id="top_nav">
	<p style="margin: 0px; float: left">
		<?php teia\FunctionPool::display_usr_nav_msg(array('greeting_txt' => 'Bem-vindo', 'login_txt' => 'Entrar/Registrar')); ?>
		&nbsp;
		<a href="/compra/shoppingcart.php">Carrinho<?php echo " ($cart_size)";?></a> &nbsp;
		<a href="/entregas/">Entregas</a> &nbsp; 
		<a href="/contacto/">Contacto</a> &nbsp;
	</p>
	<?php 
		if ($show_search) {
			?>
	<form method="post" action="procurar.php">
		<input type="text" name="procurar" id="caixa_procurar" style="float: right" />
		<a href="search.php">
			<img src="/img/procurar.png" style="float: right" alt="Procurar" />
		</a>
	</form>
	<?php 	
		}
	?>
	
	<br />
</div>
